<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!-- 1.引入 ECharts 文件 -->
    <script src="./echarts/echarts.min.js"></script>
</head>

<body>
    <!-- 2.为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">

        // 3.1 基于准备好的dom，初始化echarts实例
        let myChart = echarts.init(document.getElementById('main'))

        let option = {
            //  标题
            title:{
              text:'籍贯  Hometown',
              textStyle:{
                color:'#666'
              }
            },
            series: [
              {
                name: 'Nightingale Chart',
                type: 'pie',
                radius: ['10%','80%'],
                center: ['50%', '50%'],
                roseType: 'area',
                itemStyle: {
                  borderRadius: 10
                },
                data: [
                  { value: 40, name: '湖北省' },
                  { value: 38, name: '广东省' },
                  { value: 32, name: '山东省' },
                  { value: 30, name: '湖南省' },
                  { value: 28, name: '江苏省' },
                  { value: 26, name: '浙江省' },
                  { value: 22, name: '上海市' },
                  { value: 18, name: '重庆市' }
                ]
              }
            ]
          }
        // 3.3使用刚指定的配置项和数据显示图表。
        myChart.setOption(option)
    </script>
</body>

</html>